<p>A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many
things.</p>
<h2>Noncompliant Code Example</h2>
<p>With a maximum number of 4 parameters:</p>
<pre>
public void doSomething(int param1, int param2, int param3, String param4, long param5) {
...
}
</pre>
<h2>Compliant Solution</h2>
<pre>
public void doSomething(int param1, int param2, int param3, String param4) {
...
}
</pre>
<h2>Exceptions</h2>
<p>Methods annotated with :</p>
<ul>
  <li> Spring’s <code>@RequestMapping</code> (and related shortcut annotations, like <code>@GetRequest</code>) </li>
  <li> JAX-RS API annotations (like <code>@javax.ws.rs.GET</code>) </li>
  <li> Bean constructor injection with <code>@org.springframework.beans.factory.annotation.Autowired</code> </li>
  <li> CDI constructor injection with <code>@javax.inject.Inject</code> </li>
  <li> <code>@com.fasterxml.jackson.annotation.JsonCreator</code> </li>
</ul>
<p>may have a lot of parameters, encapsulation being possible. Such methods are therefore ignored.</p>

